writeLDRImage

fun writeLDRImage(stream: OutputStream, format: String, gamma: Float = 1.0f)

Saves the current image to stream in LDR format (e.g. "png", "jpg") applying gamma correction through P_out = P_in^(1/gamma).

Should be called after normalizeImage and clampImage to ensure pixel values are in the expected 0.0, 1.0 range.

See also

Throws

if an error occurs during writing